home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / mc51bugs / q34168 < prev    next >
Text File  |  1988-10-12  |  884b  |  30 lines

  1. Q34168 C1059 Error with typedef and Function Definition
  2. C Compiler
  3. 5.10   | 5.10
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.    The following code fragment produces error C1059 "out of near heap
  8. space" under C Version 5.10:
  9.  
  10.      #include <stdio.h>
  11.  
  12.      typedef void FTYPE (int f);
  13.  
  14.      FTYPE foo_function
  15.      { printf ("f=%u",f);
  16.      }
  17.  
  18.   This code causes a protection violation when compiled under
  19. OS/2.
  20.    Microsoft has confirmed this to be a problem in Version 5.10
  21. of the C compiler. We are researching this problem and will post
  22. new information as it becomes available.
  23.    Note that the code is incorrect; typedef cannot be used for
  24. function definitions. You can use typedef to declare functions but not
  25. to define them; therefore, to correct this problem, you should use the
  26. standard-function definition syntax.
  27.  
  28. Keywords:  buglist5.10 qfbv
  29. Updated  88/10/13 06:10
  30.